{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "dfab33d9",
   "metadata": {},
   "outputs": [],
   "source": [
    "from spaceship_api import APIClient, get_auth\n",
    "\n",
    "DESKTOP = r\"C:/Users/Administrator/Desktop\"\n",
    "# 鉴权信息配置文件(json格式)\n",
    "SS_CONFIG_PATH = r\"C:/sites/wp_sites/spaceship_config.json\""
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "dfca45e4",
   "metadata": {},
   "outputs": [],
   "source": [
    "auth=get_auth(SS_CONFIG_PATH)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "7f5cbdba",
   "metadata": {},
   "outputs": [],
   "source": [
    "key=auth[\"api_key\"]\n",
    "secret=auth[\"api_secret\"]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "e6011b15",
   "metadata": {},
   "outputs": [],
   "source": [
    "api=APIClient(key, secret)\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "c02505b7",
   "metadata": {},
   "outputs": [],
   "source": [
    "api.list_domains(take=3, skip=0, order_by=\"expirationDate\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "b793c2eb",
   "metadata": {},
   "outputs": [],
   "source": [
    "api.list_domains_names_only(take=3)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "57f8a954",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "base",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.12.7"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
